package com.itheima.cammon;

/**
 * @author 王同学
 */
public class ThreadLocalUtil {
    //设置线程方法
    private static ThreadLocal<String> threadLocal=new ThreadLocal<>();

    //设置id
    public static void setId(String id){
        threadLocal.set(id);
    }

    //获取id
    public static String getId(){
        return threadLocal.get();
    }
}
